package com.wlc.service;

import com.wlc.pojo.LeaveApplication;
import com.wlc.pojo.PageResult;
import java.util.List;
import java.util.Map;

public interface LeaveService {

    /**
     * 分页查询请假申请列表
     */
    PageResult<LeaveApplication> findLeaveList(Long applicantId, Integer leaveType,
                                               Integer status, String startDate,
                                               String endDate, Integer page, Integer size);

    /**
     * 根据ID查询请假申请
     */
    LeaveApplication findById(Long id);

    /**
     * 新增请假申请
     */
    void save(LeaveApplication leaveApplication);

    /**
     * 更新请假申请
     */
    void update(LeaveApplication leaveApplication);

    /**
     * 删除请假申请
     */
    void deleteById(Long id);

    /**
     * 撤销请假申请
     */
    void cancelLeave(Long id, Long applicantId);

    /**
     * 获取请假类型列表
     */
    List<Map<String, Object>> getLeaveTypes();

    /**
     * 审批请假申请
     */
    void approveLeave(Long id, Integer status, String approveRemark, Long approverId, String approverName);
}